package cn.edu.swu.core;

public class JsonResponseWrapper {
    private Boolean success;
    private Object data;

    public static JsonResponseWrapper wrap(Object object) {
        return JsonResponseWrapper.wrap(true, object);
    }

    public static JsonResponseWrapper wrap(Boolean success, Object object) {
        JsonResponseWrapper wrapper = new JsonResponseWrapper();
        wrapper.setSuccess(success);
        wrapper.setData(object);
        return wrapper;
    }

    public void setData(Object object) {
        this.data = object;
    }

    public Object getData() {
        return this.data;
    }

    public Boolean getSuccess() {
        return success;
    }

    public void setSuccess(Boolean success) {
        this.success = success;
    }
}
